<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>My Project: libs/atomic.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">My Project
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_6719ab1f1f7655efc2fa43f7eb574fd1.html">libs</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">atomic.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="atomic_8h.html">浏览该文件的文档.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="preprocessor">#ifndef __LIBS_ATOMIC_H__</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="preprocessor">#define __LIBS_ATOMIC_H__</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160; </div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment">/* Atomic operations that C can&#39;t guarantee us. Useful for resource counting</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> * etc.. */</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160; </div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="atomic_8h.html#a5d15f6a3002f1add23fb15694d775a9d">set_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr)</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;    <a class="code" href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a>((always_inline));</div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="atomic_8h.html#a9556608513fd1919d15807516d5a600d">clear_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr)</div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;    <a class="code" href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a>((always_inline));</div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="atomic_8h.html#a46b27dd4230b5ca02b39f11952cbb7bf">change_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr)</div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;    <a class="code" href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a>((always_inline));</div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="atomic_8h.html#a616f144debcc6c70f383f8709c989595">test_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr)</div>
<div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;    <a class="code" href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a>((always_inline));</div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="atomic_8h.html#aa1e490e1026086ea8ebab09b95676b45">test_and_set_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr)</div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;    <a class="code" href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a>((always_inline));</div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="atomic_8h.html#a699223c4f7c0a293ef3855964d3a315b">test_and_clear_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr)</div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;    <a class="code" href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a>((always_inline));</div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160; </div>
<div class="line"><a name="l00020"></a><span class="lineno"><a class="line" href="atomic_8h.html#a2f660aa23a5dbc0f4b8df48b4302b8c3">   20</a></span>&#160;<span class="preprocessor">#define BITS_PER_LONG __riscv_xlen</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160; </div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="preprocessor">#if (BITS_PER_LONG == 64)</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="preprocessor">#define __AMO(op) &quot;amo&quot;</span> #op &quot;.d&quot;</div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="preprocessor">#elif (BITS_PER_LONG == 32)</span></div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#define __AMO(op) &quot;amo&quot;</span> #op &quot;.w&quot;</div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="preprocessor">#error &quot;Unexpected BITS_PER_LONG&quot;</span></div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno"><a class="line" href="atomic_8h.html#a7f4237211a2af41cbbc5701d1507812e">   30</a></span>&#160;<span class="preprocessor">#define BIT_MASK(nr) (1UL &lt;&lt; ((nr) % BITS_PER_LONG))</span></div>
<div class="line"><a name="l00031"></a><span class="lineno"><a class="line" href="atomic_8h.html#aa1d7bafbfefe720ffcfd2155cc451ba6">   31</a></span>&#160;<span class="preprocessor">#define BIT_WORD(nr) ((nr) / BITS_PER_LONG)</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160; </div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="line" href="atomic_8h.html#a8a39c5c321bffa84fb918ce4c0c56f0d">   33</a></span>&#160;<span class="preprocessor">#define __test_and_op_bit(op, mod, nr, addr)                         \</span></div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">    ({                                                               \</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">        unsigned long __res, __mask;                                 \</span></div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">        __mask = BIT_MASK(nr);                                       \</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">        __asm__ __volatile__(__AMO(op) &quot; %0, %2, %1&quot;</span>                 \</div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;                             : &quot;=r&quot;(__res), &quot;+A&quot;(addr[BIT_WORD(nr)]) \</div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;                             : &quot;r&quot;(mod(__mask)));                    \</div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;        ((__res &amp; __mask) != 0);                                     \</div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;    })</div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160; </div>
<div class="line"><a name="l00043"></a><span class="lineno"><a class="line" href="atomic_8h.html#a456d46b8ac2caf38d48fba033c080a82">   43</a></span>&#160;<span class="preprocessor">#define __op_bit(op, mod, nr, addr)                 \</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">    __asm__ __volatile__(__AMO(op) &quot; zero, %1, %0&quot;</span>  \</div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;                         : &quot;+A&quot;(addr[BIT_WORD(nr)]) \</div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;                         : &quot;r&quot;(mod(BIT_MASK(nr))))</div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160; </div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="comment">/* Bitmask modifiers */</span></div>
<div class="line"><a name="l00049"></a><span class="lineno"><a class="line" href="atomic_8h.html#a78880d18ef4c87b39644633ea81e130b">   49</a></span>&#160;<span class="preprocessor">#define __NOP(x) (x)</span></div>
<div class="line"><a name="l00050"></a><span class="lineno"><a class="line" href="atomic_8h.html#ae985c1be976be244cccc3d16c1232c92">   50</a></span>&#160;<span class="preprocessor">#define __NOT(x) (~(x))</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160; </div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="comment">/* *</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="comment"> * set_bit - Atomically set a bit in memory</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;<span class="comment"> * @nr:     the bit to set</span></div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="comment"> * @addr:   the address to start counting from</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="comment"> * Note that @nr may be almost arbitrarily large; this function is not</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="comment"> * restricted to acting on a single-word quantity.</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="comment"> * */</span></div>
<div class="line"><a name="l00060"></a><span class="lineno"><a class="line" href="atomic_8h.html#a5d15f6a3002f1add23fb15694d775a9d">   60</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="atomic_8h.html#a5d15f6a3002f1add23fb15694d775a9d">set_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr) {</div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    <a class="code" href="atomic_8h.html#a456d46b8ac2caf38d48fba033c080a82">__op_bit</a>(or, <a class="code" href="atomic_8h.html#a78880d18ef4c87b39644633ea81e130b">__NOP</a>, nr, ((<span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *)addr));</div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;}</div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160; </div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="comment">/* *</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="comment"> * clear_bit - Atomically clears a bit in memory</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="comment"> * @nr:     the bit to clear</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="comment"> * @addr:   the address to start counting from</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="comment"> * */</span></div>
<div class="line"><a name="l00069"></a><span class="lineno"><a class="line" href="atomic_8h.html#a9556608513fd1919d15807516d5a600d">   69</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="atomic_8h.html#a9556608513fd1919d15807516d5a600d">clear_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr) {</div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    <a class="code" href="atomic_8h.html#a456d46b8ac2caf38d48fba033c080a82">__op_bit</a>(and, <a class="code" href="atomic_8h.html#ae985c1be976be244cccc3d16c1232c92">__NOT</a>, nr, ((<span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *)addr));</div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;}</div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160; </div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="comment">/* *</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="comment"> * change_bit - Atomically toggle a bit in memory</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;<span class="comment"> * @nr:     the bit to change</span></div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="comment"> * @addr:   the address to start counting from</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;<span class="comment"> * */</span></div>
<div class="line"><a name="l00078"></a><span class="lineno"><a class="line" href="atomic_8h.html#a46b27dd4230b5ca02b39f11952cbb7bf">   78</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="atomic_8h.html#a46b27dd4230b5ca02b39f11952cbb7bf">change_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr) {</div>
<div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;    <a class="code" href="atomic_8h.html#a456d46b8ac2caf38d48fba033c080a82">__op_bit</a> (xor, <a class="code" href="atomic_8h.html#a78880d18ef4c87b39644633ea81e130b">__NOP</a>, nr, ((<span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *)addr));</div>
<div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;}</div>
<div class="line"><a name="l00081"></a><span class="lineno">   81</span>&#160; </div>
<div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;<span class="comment">/* *</span></div>
<div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;<span class="comment"> * test_bit - Determine whether a bit is set</span></div>
<div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;<span class="comment"> * @nr:     the bit to test</span></div>
<div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;<span class="comment"> * @addr:   the address to count from</span></div>
<div class="line"><a name="l00086"></a><span class="lineno">   86</span>&#160;<span class="comment"> * */</span></div>
<div class="line"><a name="l00087"></a><span class="lineno"><a class="line" href="atomic_8h.html#a616f144debcc6c70f383f8709c989595">   87</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="atomic_8h.html#a616f144debcc6c70f383f8709c989595">test_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr) {</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <span class="keywordflow">return</span> (((*(<span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *)addr) &gt;&gt; nr) &amp; 1);</div>
<div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;}</div>
<div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160; </div>
<div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;<span class="comment">/* *</span></div>
<div class="line"><a name="l00092"></a><span class="lineno">   92</span>&#160;<span class="comment"> * test_and_set_bit - Atomically set a bit and return its old value</span></div>
<div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;<span class="comment"> * @nr:     the bit to set</span></div>
<div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;<span class="comment"> * @addr:   the address to count from</span></div>
<div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;<span class="comment"> * */</span></div>
<div class="line"><a name="l00096"></a><span class="lineno"><a class="line" href="atomic_8h.html#aa1e490e1026086ea8ebab09b95676b45">   96</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="atomic_8h.html#aa1e490e1026086ea8ebab09b95676b45">test_and_set_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr) {</div>
<div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="atomic_8h.html#a8a39c5c321bffa84fb918ce4c0c56f0d">__test_and_op_bit</a>(or, <a class="code" href="atomic_8h.html#a78880d18ef4c87b39644633ea81e130b">__NOP</a>, nr, ((<span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *)addr));</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;}</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160; </div>
<div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;<span class="comment">/* *</span></div>
<div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;<span class="comment"> * test_and_clear_bit - Atomically clear a bit and return its old value</span></div>
<div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;<span class="comment"> * @nr:     the bit to clear</span></div>
<div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;<span class="comment"> * @addr:   the address to count from</span></div>
<div class="line"><a name="l00104"></a><span class="lineno">  104</span>&#160;<span class="comment"> * */</span></div>
<div class="line"><a name="l00105"></a><span class="lineno"><a class="line" href="atomic_8h.html#a699223c4f7c0a293ef3855964d3a315b">  105</a></span>&#160;<span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="atomic_8h.html#a699223c4f7c0a293ef3855964d3a315b">test_and_clear_bit</a>(<span class="keywordtype">int</span> nr, <span class="keyword">volatile</span> <span class="keywordtype">void</span> *addr) {</div>
<div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="atomic_8h.html#a8a39c5c321bffa84fb918ce4c0c56f0d">__test_and_op_bit</a>(and, <a class="code" href="atomic_8h.html#ae985c1be976be244cccc3d16c1232c92">__NOT</a>, nr, ((<span class="keyword">volatile</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> *)addr));</div>
<div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;}</div>
<div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160; </div>
<div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* !__LIBS_ATOMIC_H__ */</span><span class="preprocessor"></span></div>
<div class="ttc" id="aatomic_8h_html_a456d46b8ac2caf38d48fba033c080a82"><div class="ttname"><a href="atomic_8h.html#a456d46b8ac2caf38d48fba033c080a82">__op_bit</a></div><div class="ttdeci">#define __op_bit(op, mod, nr, addr)</div><div class="ttdef"><b>Definition:</b> atomic.h:43</div></div>
<div class="ttc" id="aatomic_8h_html_a46b27dd4230b5ca02b39f11952cbb7bf"><div class="ttname"><a href="atomic_8h.html#a46b27dd4230b5ca02b39f11952cbb7bf">change_bit</a></div><div class="ttdeci">static void change_bit(int nr, volatile void *addr) __attribute__((always_inline))</div><div class="ttdef"><b>Definition:</b> atomic.h:78</div></div>
<div class="ttc" id="aatomic_8h_html_a5d15f6a3002f1add23fb15694d775a9d"><div class="ttname"><a href="atomic_8h.html#a5d15f6a3002f1add23fb15694d775a9d">set_bit</a></div><div class="ttdeci">static void set_bit(int nr, volatile void *addr) __attribute__((always_inline))</div><div class="ttdef"><b>Definition:</b> atomic.h:60</div></div>
<div class="ttc" id="aatomic_8h_html_a616f144debcc6c70f383f8709c989595"><div class="ttname"><a href="atomic_8h.html#a616f144debcc6c70f383f8709c989595">test_bit</a></div><div class="ttdeci">static bool test_bit(int nr, volatile void *addr) __attribute__((always_inline))</div><div class="ttdef"><b>Definition:</b> atomic.h:87</div></div>
<div class="ttc" id="aatomic_8h_html_a699223c4f7c0a293ef3855964d3a315b"><div class="ttname"><a href="atomic_8h.html#a699223c4f7c0a293ef3855964d3a315b">test_and_clear_bit</a></div><div class="ttdeci">static bool test_and_clear_bit(int nr, volatile void *addr) __attribute__((always_inline))</div><div class="ttdef"><b>Definition:</b> atomic.h:105</div></div>
<div class="ttc" id="aatomic_8h_html_a78880d18ef4c87b39644633ea81e130b"><div class="ttname"><a href="atomic_8h.html#a78880d18ef4c87b39644633ea81e130b">__NOP</a></div><div class="ttdeci">#define __NOP(x)</div><div class="ttdef"><b>Definition:</b> atomic.h:49</div></div>
<div class="ttc" id="aatomic_8h_html_a8a39c5c321bffa84fb918ce4c0c56f0d"><div class="ttname"><a href="atomic_8h.html#a8a39c5c321bffa84fb918ce4c0c56f0d">__test_and_op_bit</a></div><div class="ttdeci">#define __test_and_op_bit(op, mod, nr, addr)</div><div class="ttdef"><b>Definition:</b> atomic.h:33</div></div>
<div class="ttc" id="aatomic_8h_html_a9556608513fd1919d15807516d5a600d"><div class="ttname"><a href="atomic_8h.html#a9556608513fd1919d15807516d5a600d">clear_bit</a></div><div class="ttdeci">static void clear_bit(int nr, volatile void *addr) __attribute__((always_inline))</div><div class="ttdef"><b>Definition:</b> atomic.h:69</div></div>
<div class="ttc" id="aatomic_8h_html_aa1e490e1026086ea8ebab09b95676b45"><div class="ttname"><a href="atomic_8h.html#aa1e490e1026086ea8ebab09b95676b45">test_and_set_bit</a></div><div class="ttdeci">static bool test_and_set_bit(int nr, volatile void *addr) __attribute__((always_inline))</div><div class="ttdef"><b>Definition:</b> atomic.h:96</div></div>
<div class="ttc" id="aatomic_8h_html_ae985c1be976be244cccc3d16c1232c92"><div class="ttname"><a href="atomic_8h.html#ae985c1be976be244cccc3d16c1232c92">__NOT</a></div><div class="ttdeci">#define __NOT(x)</div><div class="ttdef"><b>Definition:</b> atomic.h:50</div></div>
<div class="ttc" id="ainit_8c_html_a189705fbc4254ff3cc332e052cd13215"><div class="ttname"><a href="init_8c.html#a189705fbc4254ff3cc332e052cd13215">__attribute__</a></div><div class="ttdeci">void __attribute__((noinline))</div><div class="ttdef"><b>Definition:</b> init.c:49</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1
</small></address>
</body>
</html>
